<template>
  <div class="">
    <div>
      <div class="w-100 ib">parent</div>
      <el-select v-model="pvalue" @change="getParent" placeholder="parent data">
        <el-option
          v-for="item in parentOptions"
          :key="item.value"
          :label="item.label"
          :value="item.value">
        </el-option>
      </el-select>
    </div>
    <Son :sonOptions="parentOptions"
      :gSonOptions="parentOptions"
      :ggSonOptions="parentOptions"
      v-on:getggSon="getggSon"/>
  </div>
</template>
 
<script>
// import Son from './son'
const Son = () => import('./son')
export default {
  name: 'attrsListeners',
  components: { Son },
  data () {
    return {
      parentOptions: [
        {value: '选项1', label: 'label1'},
        {value: '选项2', label: 'label2'},
        {value: '选项3', label: 'label3'}
      ],
      pvalue: '选项2'
    }
  },
  methods: {
    getParent(v) {
      // console.log(v)
      // console.log(this.$refs.son)
      // const son = this.$refs.son
      // son.value = v
      // son.openDialog()
    },
    getggSon(v) {
      console.log(v)
      this.pvalue = v
    }
  }
}
</script>
 
<style scoped lang="less">
 
</style>